package io;

import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;

public class IODemo7 {
    public static void main(String[] args) {
        try (Writer writer=new FileWriter("./test.txt")){
            String buffer="开心每一天";
            //char[] buffer=new char[]{'开','心','每','一','天'};
            writer.write(buffer,0,2);

        }catch (IOException e){
            throw new RuntimeException();
        }
    }
}
